<?php


namespace App\Commons\Domain\Module\Coin\Model;


use App\Commons\Domain\Core\Model;
use App\Commons\Domain\Module\UserCenter\Model\Member;


/**
 * App\Commons\Domain\Module\Coin\Model\ExtractAddress
 *
 * @property int $id
 * @property \Illuminate\Support\Carbon $created_at
 * @property \Illuminate\Support\Carbon $updated_at
 * @property string $uid 用户uid
 * @property int $coin_id 币种id
 * @property string $address 提币地址
 * @property string $remark 备注
 * @property string|null $deleted_at 是否删除
 * @property-read \App\Commons\Domain\Module\Coin\Model\Coin $coin
 * @property-read Member $member
 * @method static \Illuminate\Database\Eloquent\Builder|ExtractAddress newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|ExtractAddress newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|ExtractAddress query()
 * @method static \Illuminate\Database\Eloquent\Builder|ExtractAddress whereAddress($value)
 * @method static \Illuminate\Database\Eloquent\Builder|ExtractAddress whereCoinId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|ExtractAddress whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|ExtractAddress whereDeletedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|ExtractAddress whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|ExtractAddress whereRemark($value)
 * @method static \Illuminate\Database\Eloquent\Builder|ExtractAddress whereUid($value)
 * @method static \Illuminate\Database\Eloquent\Builder|ExtractAddress whereUpdatedAt($value)
 * @mixin \Eloquent
 */
class ExtractAddress extends Model
{
    /**
     * 提币用户
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     */
    public function member()
    {
        return $this->belongsTo(Member::class, 'uid', 'uid');
    }

    /**
     * 提币币种
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     */
    public function coin()
    {
        return $this->belongsTo(Coin::class, 'coin_id', 'id');
    }

}
